//
//  MyPersonalattentioTableViewCell.m
//  Gxj
//
//  Created by 💋索少杰 on 2017/9/23.
//  Copyright © 2017年 wkq. All rights reserved.
//

#import "MyPersonalattentioTableViewCell.h"

@implementation MyPersonalattentioTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self.contentView addSubview:self.iconImageFS];
        [self.iconImageFS addSubview:self.headportraitButFS];
        [self.contentView addSubview:self.nameLabelFS];
        [self.contentView addSubview:self.attentionButFS];
        [self.contentView addSubview:self.djImageFS];
        [self.contentView addSubview:self.djLabelFS];
        [self.contentView addSubview:self.browseImageFS];
        [self.contentView addSubview:self.numLabelFS];
        [self.contentView addSubview:self.lineLabel];
        
        [self setAdapterView];//位置
    }
    return self;
}
- (void)setAdapterView{
    
    //阴影
    _iconImageFS.sd_layout
    .topSpaceToView(self.contentView, kHeightScale(10))
    .leftSpaceToView(self.contentView, kWidthScale(15))
    .widthIs(kWidthScale(50))
    .heightIs(kHeightScale(50));
    
    _headportraitButFS.sd_layout
    .topSpaceToView(self.iconImageFS, kHeightScale(2.5))
    .leftSpaceToView(self.iconImageFS, kWidthScale(2.5))
    .widthIs(kWidthScale(45))
    .heightIs(kHeightScale(45));
    
    _nameLabelFS.sd_layout
    .topSpaceToView(self.contentView, kHeightScale(18))
    .leftSpaceToView(self.iconImageFS, kWidthScale(5))
    .widthIs(kWidthScale(120))
    .autoHeightRatio(0);
    
    _attentionButFS.sd_layout
    .topSpaceToView(self.contentView, kHeightScale(24))
    .rightSpaceToView(self.contentView, kWidthScale(15))
    .widthIs(kWidthScale(44))
    .heightIs(kHeightScale(22));
    
    _djImageFS.sd_layout
    .topSpaceToView(self.nameLabelFS, kHeightScale(5))
    .leftSpaceToView(self.iconImageFS, kWidthScale(5))
    .widthIs(kWidthScale(10))
    .heightIs(kHeightScale(10));
    
    _djLabelFS.sd_layout
    .centerYEqualToView(self.djImageFS)
    .leftSpaceToView(self.djImageFS, kWidthScale(5))
    .widthIs(kWidthScale(30))
    .autoHeightRatio(0);
    
    _browseImageFS.sd_layout
    .centerYEqualToView(self.djImageFS)
    .leftSpaceToView(self.djLabelFS, kWidthScale(10))
    .widthIs(kWidthScale(13))
    .heightIs(kHeightScale(8.6));
    
    _numLabelFS.sd_layout
    .centerYEqualToView(self.djImageFS)
    .leftSpaceToView(self.browseImageFS, kWidthScale(5))
    .widthIs(kWidthScale(100/2))
    .autoHeightRatio(0);
    
    _lineLabel.sd_layout
    .bottomSpaceToView(self.contentView, 0)
    .leftSpaceToView(self.contentView, 0)
    .rightSpaceToView(self.contentView, 0)
    .heightIs(kHeightScale(1));
    
}

- (UIView *)iconImageFS
{
    if (!_iconImageFS)
    {
        _iconImageFS=[[UIView alloc] init];
        _iconImageFS.backgroundColor = [UIColor colorWithRed:(213.0/255) green:(213.0/255) blue:(213.0/255) alpha:1];
        _iconImageFS.layer.masksToBounds=YES;
        _iconImageFS.layer.cornerRadius=25;
        _iconImageFS.layer.shadowColor = [UIColor blackColor].CGColor;
        _iconImageFS.layer.shadowOffset = CGSizeMake(-3, 1);
        _iconImageFS.layer.shadowOpacity = 0.4;
        _iconImageFS.layer.shadowRadius = 2.0;
        _iconImageFS.clipsToBounds = NO;
    }
    return _iconImageFS;
}
- (UIButton *)headportraitButFS
{
    if (!_headportraitButFS)
    {
        _headportraitButFS= [[UIButton alloc] init];
        _headportraitButFS.layer.masksToBounds=YES;
        _headportraitButFS.layer.cornerRadius=kWidthScale(22.5);
        [_headportraitButFS setBackgroundImage:[UIImage imageNamed:@"1111"] forState:UIControlStateNormal];
    }
    return _headportraitButFS;
}
- (UILabel *)nameLabelFS
{
    if (!_nameLabelFS)
    {
        _nameLabelFS=[[UILabel alloc] init];
        _nameLabelFS.text=@"迪丽热巴";
        _nameLabelFS.textColor=[UIColor colorWithHexString:@"#333333"];
        _nameLabelFS.font=[UIFont systemFontOfSize:kWidthScale(15)];
    }
    return _nameLabelFS;
}
- (UIButton *)attentionButFS
{
    if (!_attentionButFS)
    {
        _attentionButFS=[[UIButton alloc] init];
        _attentionButFS.layer.borderWidth=1;
        _attentionButFS.layer.cornerRadius=kWidthScale(5);
        _attentionButFS.layer.borderColor=[UIColor colorWithRed:(76.0/255) green:(15.0/255) blue:(204.0/255) alpha:1].CGColor;
        [_attentionButFS setTitle:@"关注" forState:UIControlStateNormal];
        _attentionButFS.titleLabel.font=[UIFont systemFontOfSize:kWidthScale(12)];
        [_attentionButFS setTitleColor:[UIColor colorWithHexString:@"5b1fd5"] forState:UIControlStateNormal];
        _attentionButFS.titleLabel.textAlignment=NSTextAlignmentCenter;
    }
    return _attentionButFS;
}
- (UIImageView *)djImageFS
{
    if (!_djImageFS)
    {
        _djImageFS=[[UIImageView alloc] init];
        _djImageFS.image=[UIImage imageNamed:@"dengji1"];
        //_djImage.backgroundColor=[UIColor colorWithHexString:@"#999999"];
    }
    return _djImageFS;
}
- (UILabel *)djLabelFS
{
    if (!_djLabelFS)
    {
        _djLabelFS=[[UILabel alloc] init];
        _djLabelFS.text=@"100级";
        _djLabelFS.textColor=[UIColor colorWithHexString:@"#999999"];
        _djLabelFS.font=[UIFont systemFontOfSize:kWidthScale(10)];
    }
    return _djLabelFS;
}
- (UIImageView *)browseImageFS
{
    if (!_browseImageFS)
    {
        _browseImageFS=[[UIImageView alloc] init];
        _browseImageFS.image=[UIImage imageNamed:@"liulans"];
    }
    return _browseImageFS;
}
- (UILabel *)numLabelFS
{
    if (!_numLabelFS)
    {
        _numLabelFS=[[UILabel alloc] init];
        _numLabelFS.text=@"100";
        _numLabelFS.textColor=[UIColor colorWithHexString:@"#999999"];
        _numLabelFS.font=[UIFont systemFontOfSize:kWidthScale(10)];
    }
    return _numLabelFS;
}
- (UILabel *)lineLabel
{
    if (!_lineLabel)
    {
        _lineLabel=[[UILabel alloc] init];
        _lineLabel.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"fengexian11111"]];
        //_lineLabel.backgroundColor=[UIColor blackColor];
    }
    return _lineLabel;
}

@end
